home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
098
/
eds.arc
/
EDSVS.LSP
< prev
Wrap
Text File
|
1980-01-01
|
812b
|
28 lines
;This function is similar to IBM CADAM's view-size
;command, it changes the scale of the view depending
;which half of the screen the user indicates on.
;Top half - view scale larger (zoom out)
;Bottom half - view scale smaller (zoom in)
;
;Function name "EDSVS.LSP" - Execute command "VS"
;
;Written by Steve Brown and Christopher Conrad
;
;
(defun c:vs ()
(setq vs (getvar "viewsize"))
(setq vc (getvar "viewctr"))
(setq ip (getpoint "indicate point"))
(setq q (/ vs 2))
(setq vcy (cadr vc))
(setq ipy (cadr ip))
(setq qy1 (- vcy ipy))
(setq qy (abs qy1))
(setq vd (* 5 (/ qy q)))
(setq sf (* vd vd))
(if (< qy1 0) (setq zm (/ 1 sf)))
(if (> qy1 0) (setq zm (* 1 sf)))
(setq zm2 (rtos zm 2 2))
(setq zm1 (strcat zm2 "x"))
(command "zoom" zm1)
)